﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Wizard.Source;

namespace Wizard.MsSql
{
    public partial class StatementSource : IStatementSource, IOwnObjects
    {
        #region IStatementSource Members

        //Wizard.Statements.Statement IStatementSource.Instantiate(Wizard.Runtime.IRunContext runContext)
        //{
        //    throw new NotImplementedException();
        //}

        IStatementSource IStatementSource.AddStatement(string statementType)
        {
            var newStatement = new StatementSource();
            newStatement.StatementType = statementType;
            newStatement.StatementSource2 = this;
            return newStatement;
        }

        #endregion

        #region IOwnObjects Members

        void IOwnObjects.DeleteOwnedObjects(DataStoreContext datastore)
        {
            datastore.DeleteObjects(this.StatementSources1);
        }

        #endregion
    }
}
